
package de.justphil.tcg.tcgandroidclient;

public class Storage {
	
	private static String userName = "";
	private static String pwd = "";
	private static String webSocketServer = "";
	private static String restServer = "";
	private static long playerId;
	
	private Storage() {
	
	}
	
	public static String getRestServer() {
	
		return Storage.restServer;
	}
	
	public static void setRestServer(String restServer) {
	
		if (restServer == null) {
			throw new IllegalArgumentException("The userName must not be null!");
		}
		Storage.restServer = restServer;
	}
	
	public static String getWebSocketServer() {
	
		return Storage.webSocketServer;
	}
	
	public static void setWebSocketServer(String webSocketServer) {
	
		if (webSocketServer == null) {
			throw new IllegalArgumentException("The userName must not be null!");
		}
		Storage.webSocketServer = webSocketServer;
	}
	
	public static String getUserName() {
	
		return Storage.userName;
	}
	
	public static long getPlayerId() {
	
		return Storage.playerId;
	}
	
	public static void setPlayerId(long playerId) {
	
		Storage.playerId = playerId;
	}
	
	public static void setUserName(String userName) {
	
		if (userName == null) {
			throw new IllegalArgumentException("The userName must not be null!");
		}
		Storage.userName = userName;
	}
	
	public static String getPwd() {
	
		return Storage.pwd;
	}
	
	public static void setPwd(String pwd) {
	
		if (userName == null) {
			throw new IllegalArgumentException("The userName must not be null!");
		}
		Storage.pwd = pwd;
	}
}
